package cn.tedu._05weibo.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

/**
 * 注册功能DTO类
 */
@Data
public class UserRegDTO {

    //@NotNull(message = "用户名不能为null")
    //@NotEmpty(message = "用户名不能为空,同时不能为null")
    //@NotBlank(message = "用户名不能为空白,不能为空,不能为null")
    //@Size(min = 6, max = 12, message = "用户名必须在6-12位之间")
    @Pattern(regexp ="^[\\u4e00-\\u9fa5]{1,7}(?<!\\p{L})(?<!\\p{L}\\p{L})[A-Za-z]{1,14}(?!\\p{L})(?!\\p{L}\\p{L})$" ,
            message ="不能超过7个汉字,英文字母不能超过14位" )
    @ApiModelProperty(value = "用户名",required = true,example = "Tony")
    private String username;
    @ApiModelProperty(value = "密码",required = true,example = "123456")
    private String password;
    @ApiModelProperty(value = "昵称",required = true,example = "tony")
    private String nickname;



}








